
import React from 'react'
import ReactDOM from "react-dom"

import {name} from "./index1"

import style from "./_style.scss"

import axios from 'axios'

let src = require('./icon1.png')
let el = (
  <div className={style.demo}>
    <img src={src} alt=""/>
    123+{name}{value2}</div>
)
console.log(value1)

axios.get('/cross/api/data').then(function (response) {
  console.log(response.data)
}).catch(function(error){
  console.log('error')
})
// axios.get('/cross/api/data').then(() => console.log(response.data))
//   .catch(() => console.log('error')
// )

axios.get('/api/data').then(function (response) {
  console.log(response)
  console.log(response.data)
}).catch(function(error){
  console.log(error)
})

// axios.get('/cross/api/data').then(function (response) {
//   console.log(response)
//   console.log(response.data)
// }).catch(function(error){
//   console.log(error)
// })
ReactDOM.render(el,document.querySelector('#app'));









